
import {reqPayInfo} from '@/api';

export default {
    namespaced:true,
    state: {
        payInfo: {},
    },
    getters: {
        totalFee(state) {
            return state.payInfo.totalFee;
        }
    },
    actions: {
        // 获得订单信息
        async getPayInfo({commit},orderId) {
            let result = await reqPayInfo(orderId);
             console.log(result.data);
            if (result.code==200) {
                commit('GETPAYINFO', result.data);
            }
        },
    },
    mutations: {
        GETPAYINFO(state, data) {
            state.payInfo = data;
        },
    }
}